<template>
	<!-- 一行题目 -->
	<div class="subject" v-for="(item, index) in list" :key="index">
		<span>{{ item.a }}</span>
		<span>+</span>
		<span>{{ item.b }}</span>
		<span>=</span>
		<input type="number" v-model="item.daan"/>
		<button @click="item.done = item.daan === (item.a + item.b) ? '回答正确' : '回答错误'">
			提交
		</button>
	</div>
</template>

<script setup>
const prop = defineProps(['list'])
</script>

<style scoped>
	.subject {
		margin: 5px;
		padding: 5px;
		font-size: 20px;
	}

	.subject span {
		display: inline-block;
		text-align: center;
		width: 20px;
	}

	.subject input {
		width: 50px;
		height: 20px;
	}
</style>